import request from '@/utils/request'
var path = "/user1"
export default {
  list(data) {
    return request({
      url: `${path}/list`,
      method: 'get',
      params: data
    })
  },

  info(urid) {
    return request({
      url: `${path}/admin/info/${urid}`,
      method: 'get',
    })
  },
  /**
 *  修改 和 添加
 * @param {修改的对象数据封装} data 
 * @returns 
 */
  updateAdd(data) {
    return request({
      url: `${path}/${!data.urId ? "save" : "update"}`,
      method: "post",
      data
    })
  },
  /**
*  删除的ids
* @param {删除} data 
* @returns 
*/
  delete(data) {
    return request({
      url: `${path}/delete`,
      method: "post",
      data
    })
  },

/**
 *  导出
 */
 export(data){
  return `${path}/export?${new URLSearchParams(data).toString()}`
 }
}